package testmysql.mysql;

import java.util.Iterator;

import org.apache.log4j.Logger;
import org.nutz.dao.Dao;
import org.nutz.dao.impl.NutDao;
import org.nutz.trans.Atom;
import org.nutz.trans.Trans;

import com.alibaba.druid.pool.DruidDataSource;

@SuppressWarnings("all")
public class App {
	private static final Logger log = Logger.getLogger(App.class);

	public static void main(String[] args) {

		DruidDataSource ds = new DruidDataSource();
		ds.setUsername("root");
		ds.setPassword("root");
		ds.setUrl("jdbc:mysql://127.0.0.1:3306/db_test?charachterEncoding=UTF-8;");

		final Dao dao = new NutDao(ds);
		dao.create(t_log.class, false);

		final int len = 10000;

		for (int i = 1; i <= 10000; i++) {
			dao.fastInsert(t_log.me_1k());
			log.debug(i);
		}

	}
}
